<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <input type="hidden" name="row[id]" value="{$row.id}">
    <div class="form-group">
        <label for="c-name" class="control-label col-xs-12 col-sm-2">{:__('name')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('title')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-money" class="control-label col-xs-12 col-sm-2">{:__('money')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-money" data-rule="required" class="form-control" name="row[money]" type="number" value="{$row.money|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-coupon_nums" class="control-label col-xs-12 col-sm-2">{:__('coupon_nums')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-coupon_nums" data-rule="required" class="form-control" name="row[coupon_nums]" type="number" value="{$row.coupon_nums|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label for="c-least_cost" class="control-label col-xs-12 col-sm-2">{:__('least_cost')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-least_cost" data-rule="required" class="form-control" name="row[least_cost]" type="number" value="{$row.least_cost|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-get_limit" class="control-label col-xs-12 col-sm-2">{:__('get_limit')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-get_limit" data-rule="required" class="form-control" name="row[get_limit]" type="number" value="{$row.get_limit|htmlentities}">
        </div>
    </div>


    <div class="form-group">
        <label for="rule" class="control-label col-xs-12 col-sm-2">{:__('rule')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[rule]', $ruleMap, $row['rule'])}
        </div>
    </div>

    <div class="form-group">
        <label for="type" class="control-label col-xs-12 col-sm-2">{:__('type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[type]', $typeMap, $row['type'])}
        </div>
    </div>
    <div class="form-group">
        <label for="status" class="control-label col-xs-12 col-sm-2">{:__('status')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[status]', $statusMap, $row['status'])}
        </div>
    </div>

    <div class="form-group">
        <label for="date_type" class="control-label col-xs-12 col-sm-2">{:__('date_type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[date_type]', $dateTypeMap, $row['date_type'])}
        </div>
    </div>

    <div class="form-group date_type_1">
        <label for="c-use_begin_time" class="control-label col-xs-12 col-sm-2">{:__('use_begin_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="datetime" name="row[use_begin_time]" value="{$row.use_begin_time|datetime}"  id="c-use_begin_time" class="form-control datetimepicker" />
        </div>
    </div>
    <div class="form-group date_type_1">
        <label for="c-use_end_time" class="control-label col-xs-12 col-sm-2">{:__('use_end_time')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="datetime" name="row[use_end_time]" value="{$row.use_end_time|datetime}"  id="c-use_end_time" class="form-control datetimepicker" />
        </div>
    </div>

    <div class="form-group date_type_2">
        <label for="c-effect_day" class="control-label col-xs-12 col-sm-2">{:__('effect_day')}:</label>
        <div class="col-xs-12 col-sm-4">
            领取<input id="c-effect_day"  class="form-control" name="row[effect_day]" type="number" value="{$row.effect_day|htmlentities}">
            天后生效，有效天数
            <input id="c-fixed_day"  class="form-control" name="row[fixed_day]" type="number" value="{$row.fixed_day|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label for="c-use_end_time" class="control-label col-xs-12 col-sm-2">*开始领取时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="datetime" name="row[get_begin_time]" value="{$row.get_begin_time|datetime}"  id="c-get_begin_time" class="form-control datetimepicker" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-use_end_time" class="control-label col-xs-12 col-sm-2">*结束领取时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="datetime" name="row[get_end_time]" value="{$row.get_end_time|datetime}"  id="c-get_end_time" class="form-control datetimepicker" />
        </div>
    </div>

    <div class="form-group">
        <label for="c-remark" class="control-label col-xs-12 col-sm-2">{:__('remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea name="row[remark]" id="c-remark"  class="form-control" cols="30" rows="10">{$row.remark|htmlentities}</textarea>
        </div>
    </div>


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
